package cn.yshujia.utils;

import com.github.yitter.contract.IdGeneratorOptions;
import com.github.yitter.idgen.YitIdHelper;


/**
 * @author YShuJia
 * @description id生成器
 * @create 2024/4/23
 */

public class IDUtils {
	
	private static final IdGeneratorOptions ID_GENERATOR = new IdGeneratorOptions();
	
	public static long getId() {
		YitIdHelper.setIdGenerator(ID_GENERATOR);
		return YitIdHelper.nextId();
	}
}
